int btnPin = 11;
int ledPin = 30;
int light = 0;

void toogleLight();
void closeLight();
void openLight();

void setup() {

  // Serial.begin(9600);
  // Serial.print("---- start -----");

  pinMode(btnPin, INPUT);
  pinMode(ledPin, OUTPUT);
}

void loop() {
    int btnPinRead = digitalRead(btnPin);
    if(btnPinRead > 0) {
      while(btnPinRead = digitalRead(btnPin)) {}
      toogleLight();
    }

}

void toogleLight() {
  if(light == 1) {
    closeLight();
  }else {
    openLight();
  }
}

void closeLight() {
  light = 0;
  digitalWrite(ledPin, LOW);
}

void openLight() {
  light = 1;
  digitalWrite(ledPin, HIGH);
}
